<template>
        <div class="flavor">
            <router-link to="Flavorzi">
                <div class="wrap">
                    <Sonflavor :imgPopular="this.arr[0].imgPopular"/>
                    <Sonflavor :imgPopular="this.arr[1].imgPopular"/>
                    <Sonflavor :imgPopular="this.arr[2].imgPopular"/>
                    <Sonflavor :imgPopular="this.arr[3].imgPopular"/>
                    <Sonflavor :imgPopular="this.arr[4].imgPopular"/>
                    <Sonflavor :imgPopular="this.arr[5].imgPopular"/>
                    <Sonflavor :imgPopular="this.arr[6].imgPopular"/>
                    <Sonflavor :imgPopular="this.arr[7].imgPopular"/>
                    <Sonflavor :imgPopular="this.arr[8].imgPopular"/>
                    
                </div>
            </router-link>
            <router-view></router-view>
        </div>
</template>

<script>
import Sonflavor from '@/components/ddgHD/sonflavor.vue'
import {getlink} from "@/api/getapi.js"
export default {
    components: { 
      Sonflavor,
    },
    data(){
        return {
            arr:[
                {imgPopular:"https://brup.shengri.cn/goods/2017/06/FrDKmg7tnwodlMF_olf9go6iaGbb.png",xqid:"xqid"},
                {imgPopular:"https://brup.shengri.cn/goods/2017/06/FrBA9_ngi3DgWAdmhnWSNkCb4YBT.png",xqid:"xqid"},
                {imgPopular:"https://brup.shengri.cn/goods/2017/06/Ft7omrHqjya1BZMtSWGXz859nhqe.png",xqid:"xqid"},
                {imgPopular:"https://brup.shengri.cn/goods/2017/06/FoF74vnoGyqgf3BwPLnpHYk8iFwb.png",xqid:"xqid"},
                {imgPopular:"https://brup.shengri.cn/goods/2017/06/Fgn4F5Gre6pTVv9zecZjqbLqKFlD.png",xqid:"xqid"},
                {imgPopular:"https://brup.shengri.cn/goods/2017/06/Fv_GILGXQbaNdh4zikvBn_06jPMF.png",xqid:"xqid"},
                {imgPopular:"https://brup.shengri.cn/goods/2017/06/Fs0MyqmELVy0KFaDpZkLkR4ViuD1.png",xqid:"xqid"},
                {imgPopular:"https://brup.shengri.cn/goods/2017/06/FvClxnZ6pNVyHGwjbxSMzfXFEL6P.png",xqid:"xqid"},
                {imgPopular:"https://brup.shengri.cn/goods/2017/06/Fur6d0sTM0HNjnes0SusRxbNyh2w.png",xqid:"xqid"}
            ]
        }
    },
    methods:{
        arr0(){
            this.$router.push("flavorzi")
        }
    },
    created(){
    getlink("http://180.76.121.47:8008/cake").then((ok)=>{
      ok.data.data.forEach((el)=>{
        if(el.typeid==1003){
        //   this.popular.push(el)
        }
      })
    })
  }

}
</script>

<style scoped>
    .flavor{
        width: 100%;
        box-sizing: border-box;
        font-size: 0.12rem;
        text-align: center;
        display: flex;
    }
    .wrap{
        display: flex;
        flex-wrap: wrap;
        text-align: center;
    }
</style>